package com.smart.five.ioc.injectfun.replace;

import org.springframework.beans.factory.support.MethodReplacer;

import java.lang.reflect.Method;

/**
 * @author junrui.wang
 * @create 2018/6/7
 */

//用于替换别人的Bean必须实现MethodReplacer接口（乾坤大挪移）
public class Boss2 implements MethodReplacer {
    public Object reimplement(Object obj, Method method, Object[] args) throws Throwable {
        Car car = new Car();
        car.setBrand("布加迪");
        return car;
    }
}
